--任务调度作业--
create table SYS_JOB
(
  job_id          NUMBER not null,
  job_name        VARCHAR2(120),
  job_group       VARCHAR2(120),
  job_status      CHAR(1),
  cron_expression VARCHAR2(120),
  bean_class      VARCHAR2(200),
  is_concurrent   CHAR(1),
  description     VARCHAR2(200),
  create_time     TIMESTAMP(6),
  update_time     TIMESTAMP(6)
)
;
comment on table SYS_JOB
  is '任务调度';
comment on column SYS_JOB.job_id
  is '主键';
comment on column SYS_JOB.job_name
  is '调度器名称';
comment on column SYS_JOB.job_group
  is '分组';
comment on column SYS_JOB.job_status
  is '状态';
comment on column SYS_JOB.cron_expression
  is '表达式';
comment on column SYS_JOB.bean_class
  is '类的路径';
comment on column SYS_JOB.is_concurrent
  is '任务是否有状态';
comment on column SYS_JOB.description
  is '描述';
comment on column SYS_JOB.create_time
  is '创建时间';
comment on column SYS_JOB.update_time
  is '更新时间';
alter table SYS_JOB
  add constraint SYS_JOB_PK primary key (JOB_ID);

CREATE SEQUENCE  "SYS_JOB_SEQ"  MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 START WITH 1 CACHE 20 NOORDER  NOCYCLE ;

CREATE OR REPLACE TRIGGER "SYS_JOB_Triger" BEFORE
          INSERT ON SYS_JOB FOR EACH ROW WHEN (new.JOB_ID is null)
      begin
          select SYS_JOB_seq.nextval into: new.JOB_ID from dual;
       end;
   